<template>
  <div class="main-tabs-container">
    <ul class="main-tabs">
      <li v-if="$store.state.userInfo.F_SecurityLevel == 18">
        <router-link class="nav-list-item active" to="home">
          <div class="round-button">
            <i class="iconfont icon-shouye"></i>
            <span>首页</span>
          </div>
        </router-link>
      </li>
      <li v-if="$store.state.userInfo.F_SecurityLevel == 18">
        <router-link class="nav-list-item" to="profit">
          <div class="round-button">
            <i class="iconfont icon-tuikuan1"></i>
            <span>收益</span>
          </div>
        </router-link>
      </li>
      <li>
        <router-link class="nav-list-item" to="user">
          <div class="round-button">
            <i class="iconfont icon-biaoqiankuozhan_wode-125"></i>
            <span>我的</span>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "NavBar",
  setup() {
    return {};
  },
};
</script>

<style lang="scss" scoped>
@import "@/common/style/mixin";

.main-tabs-container {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 0.5rem 0;
  z-index: 1000;
  background: #fff;
}
.main-tabs {
  @include fj();
  li {
    flex: 1;
  }
}
.round-button {
  display: flex;
  flex-direction: column;
}
.round-button {
  height: 4.8rem;
  width: 4.8rem;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  position: relative;
  i {
    text-align: center;
    font-size: 2.2rem;
  }
  span {
    font-size: 1.2rem;
  }
}
.router-link-active {
  color: $green;
  .round-button::after {
    content: "";
    height: 100%;
    width: 100%;
    border-radius: 50%;
    transition: color 0.2s ease-in-out;
    animation: jello-horizontal 0.9s both;
    position: absolute;
    background: $green;
    opacity: 0.2;
  }
}
@keyframes jello-horizontal {
  0% {
    transform: scale3d(1, 1, 1);
  }
  30% {
    transform: scale3d(1.25, 0.75, 1);
  }
  40% {
    transform: scale3d(0.75, 1.25, 1);
  }
  50% {
    transform: scale3d(1.15, 0.85, 1);
  }
  65% {
    transform: scale3d(0.95, 1.05, 1);
  }
  75% {
    transform: scale3d(1.05, 0.95, 1);
  }
  100% {
    transform: scale3d(1, 1, 1);
  }
}
</style>
